﻿Partial Public Class BrowserPage

    Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
        Dim dialog = New Microsoft.Win32.OpenFileDialog
        dialog.Filter = "アプリケーション(*.exe)|*.exe"

        Dim folder As String
        Try
            folder = System.IO.Path.GetDirectoryName(PathTextBox.Text)
            If System.IO.Directory.Exists(folder) Then
                dialog.InitialDirectory = folder
            End If

        Catch ex As Exception
            ' Ignore
        End Try

        If dialog.ShowDialog(ViewModelHelper.OwnerWindow) Then
            PathTextBox.Text = dialog.FileName
        End If
    End Sub
End Class
